import request from '@/utils/request'

// 查询冻存管 列表
export function listTube(containerId) {
  return request({
    url: '/biobank/tube/list/' + containerId,
    method: 'get'
  })
}

// 查询冻存管 详细
export function getTube(tubeId) {
  return request({
    url: '/biobank/tube/' + tubeId,
    method: 'get'
  })
}

// 新增冻存管
export function addTube(data) {
  return request({
    url: '/biobank/tube',
    method: 'post',
    data: data
  })
}

// 修改冻存管
export function updateTube(data) {
  return request({
    url: '/biobank/tube',
    method: 'put',
    data: data
  })
}

// 删除冻存管
export function delTube(tubeId) {
  return request({
    url: '/biobank/tube/' + tubeId,
    method: 'delete'
  })
}

// 确认样本位置
export function confirmLocation(data) {
  return request({
    url: '/biobank/tube/confirmLocation',
    method: 'post',
    data: data
  })
}

// 清空样本位置
export function clearLocation(data) {
  return request({
    url: '/biobank/tube/clearLocation',
    method: 'post',
    data: data
  })
}

export function delSample(sampBackupIds) {
  return request({
    url: '/biobank/tube/delSample/' + sampBackupIds,
    method: 'delete'
  })
}
